﻿<%@ Page Language="C#" MasterPageFile="~/Theme/Stander/Stander.master" AutoEventWireup="true" CodeFile="accounts.aspx.cs" Inherits="Finance_accounts" Title="账目管理－－财务部" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<fieldset>
    <h1 class="pagetitle"> 清单:
        <asp:Label ID="lblHeadPactCode" runat="server" ForeColor="Red"></asp:Label>
        的所有订单</h1>
    <table><tr>
         <td><asp:Label ID="lblHeadCustomerName" runat="server" Font-Bold="True" Font-Size="14px"
            ForeColor="#FD3309" Text="客户: "></asp:Label></td>
         <td> &nbsp; &nbsp; &nbsp;&nbsp; 清单状态:</td>
         <td><asp:Image ID="imgBillFinanceAudit" ImageAlign="Top" runat="server" /></td>
     </tr></table>     
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:UpdateProgress id="UpdateProgress1" runat="server">
                 <ProgressTemplate>
                     <img src="../Theme/Stander/img/ajax-loader.gif" />正在处理...
                 </ProgressTemplate>
             </asp:UpdateProgress> 
             <asp:GridView id="gvOrderListByBillId" runat="server" OnRowCommand="gvOrderListByBillId_RowCommand" 
                OnRowDataBound="gvOrderListByBillId_RowDataBound" DataKeyNames="Id" 
                CssClass="normal mouseOver" AutoGenerateColumns="False">
                <Columns>
                    <asp:BoundField DataField="MediaInfoName" HeaderText="媒介">
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="状态"><ItemTemplate>
                        <span class="audit">客户:<asp:Image ID="imgCustomerAudit" runat="server" AlternateText='<%# Utils.GetAuditString(Eval("FinanceAudit")) %>'
                                ImageUrl='<%# Eval("FinanceAudit", "~/pics/Audit{0}.png") %>' /></span>
                        <span class="audit">媒介:<asp:Image ID="imgMediaAudit" runat="server" AlternateText='<%# Utils.GetAuditString(Eval("MediaFinanceAudit")) %>'
                                ImageUrl='<%# Eval("MediaFinanceAudit", "~/pics/Audit{0}.png") %>' /></span>
                                        
                    </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HtmlEncode="False" DataFormatString="{0:f2}" DataField="Income" HeaderText="应收客户">
                    <ItemStyle ForeColor="Blue"></ItemStyle>
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="已收客户">
                    <ItemStyle ForeColor="Green"></ItemStyle>
                    <ItemTemplate>
                    <asp:Label ID="lblIncomeCheck" runat="server" 
                        Text='<%# ((decimal)Eval("RealIncome") - (decimal)Eval("Income"))>=0 ? "<font color=#FF0000><B>√ </B></font>" : "" %>'>
                    </asp:Label>
                    <asp:Label runat="server" Text='<%# Bind("RealIncome", "{0:f2}") %>' id="Label1"></asp:Label>
                    
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HtmlEncode="False" DataFormatString="{0:f2}" DataField="Payout" HeaderText="应付媒介">
<ItemStyle ForeColor="Blue"></ItemStyle>
</asp:BoundField>
<asp:TemplateField HeaderText="已付媒介">
<ItemStyle ForeColor="Green"></ItemStyle>
<ItemTemplate>
    <asp:Label ID="lblPayoutCheck" runat="server" 
        Text='<%# ((decimal)Eval("RealPayout") - (decimal)Eval("Payout"))>=0 ? "<font color=#FF0000><B>√ </B></font>" : "" %>'>
    </asp:Label>
    <asp:Label runat="server" Text='<%# Bind("RealPayout", "{0:f2}") %>' id="Label2"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="应得利润"><ItemTemplate>
    <asp:Label ID="GainLabel" runat="server" ForeColor="blue" 
        Text='<%# Eval("Gain", "{0:f2}") %>'></asp:Label>            
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="实际利润"><ItemTemplate>
      <asp:Label ID="RealGainLabel" runat="server" ForeColor="green" 
        Text='<%# Eval("RealGain", "{0:f2}") %>'></asp:Label>             
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="客户财务"><ItemTemplate>
<asp:HyperLink id="hlGotoAndGetIncome" runat="server" Text="去收款" 
    NavigateUrl='<%# Eval("Id", "~/Bill/IncomeRecord.aspx?OrderId={0}") %>'></asp:HyperLink>&nbsp; 
<asp:LinkButton id="lbtnCustomerAudit" runat="server" Text="结算" ToolTip="客户结算" 
    CommandName="CustomerBalance" 
     CommandArgument='<%# Eval("Id") %>' CausesValidation="False"
     OnClientClick='if(!confirm("你确定对该客户执行 结算/反结算 操作吗?")) return false;'>
</asp:LinkButton> 
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="媒介财务"><ItemTemplate>
<asp:HyperLink id="hlGotoPay" runat="server" Text="去付款" 
    NavigateUrl='<%# Eval("Id", "../Bill/PayoutRecord.aspx?OrderId={0}") %>' ></asp:HyperLink>&nbsp; 
<asp:LinkButton id="lbtnMediaAudit" runat="server" Text="结算" 
    ToolTip="媒体结算" CommandName="MediaBalance" 
    CommandArgument='<%# Eval("Id") %>' CausesValidation="False"
    OnClientClick='if(!confirm("你确定对该媒介执行 结算/反结算 操作吗?")) return false;'>
 </asp:LinkButton> 
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
    没有记录.
</EmptyDataTemplate>
</asp:GridView> 
</ContentTemplate>
      </asp:UpdatePanel>
</fieldset>
</asp:Content>

